﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace TpWeb.Domain.Repositories
{
    using System.Linq.Expressions;
    using TpWeb.Domain.BizObj;

    public interface IRepository<TEntity, TKey>
        where TEntity : class, IEntity<TKey>
    {

        int? Identity();
        TEntity Find(TKey key);

        IQueryable<TEntity> All { get; }
        IQueryable<TEntity> AllIncluding(params Expression<Func<TEntity, object>>[] includeProperties);

        void Insert(TEntity ent);
        void Update(TEntity ent);
        void Delete(TEntity ent);
    }
}
